Skip to content

feat(bmj): show elapsed time for already-completed benchmark jobs in bmj watch#177

Open
rlagentflowbeta[bot] wants to merge 1 commit intomainfrom
agent/bmj-watch-elapsed-time-completed
Open

feat(bmj): show elapsed time for already-completed benchmark jobs in bmj watch#177
rlagentflowbeta[bot] wants to merge 1 commit intomainfrom
agent/bmj-watch-elapsed-time-completed

Conversation

@rlagentflowbeta
Copy link
Contributor

Summary

  • When `rli bmj watch` is called on a job that has already completed, it now displays the total elapsed time before printing the results table
  • Elapsed time is inferred by fetching each `BenchmarkRun` associated with the job's `benchmark_outcomes` and computing `max(start_time_ms + duration_ms) - job.create_time_ms`
  • The existing live-monitoring path (where the job completes while watch is running) is unchanged

How it works

`BenchmarkJobView` has `create_time_ms` (start) but no end time field. `BenchmarkRunView` has both `start_time_ms` and `duration_ms`, so `end_time = start_time_ms + duration_ms`. The job is considered complete when the last benchmark run finishes, so total elapsed = `max(run end times) - job.create_time_ms`.

Note: the `BenchmarkJobView` API has no update endpoint and no metadata field, so caching the computed end time server-side is not currently feasible.

Test plan

  • Run `rli bmj watch ` and verify total elapsed time appears before the results table
  • Run `rli bmj watch ` and verify the live monitoring path is unchanged
  • Verify graceful handling when benchmark run data is unavailable (no elapsed time shown, no crash)

🤖 Generated with Claude Code

…watch

When `rli bmj watch` is called on a job that has already completed, it
now displays the total elapsed time by inferring the end time from the
benchmark run data (start_time_ms + duration_ms). Previously, the
completed-job path printed the results table without any timing info.
@rlagentflowbeta
Copy link
Contributor Author

🤖 This PR was created by Agent Flow.

View the agent run →

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants